<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
访问ServletAPI中的数据<br/>
<br/>
方法1：JSP内置对象<br/>
<%=request.getAttribute("loginAddress") %><br/>
欢迎您，<%=session.getAttribute("username") %><br/>
<%=application.getAttribute("online") %><br>
<br>
方法2：EL表达式<br>
${request.loginAddress}<br>
欢迎您，${session.username}<br>
${application.online }<br>
<br>
方法3：Struts2标签<br>
<s:property value="#request.loginAddress"/><br>
<s:property value="#attr.loginAddress"/><br>
欢迎您，<s:property value="#session.username"/><br>
欢迎您，<s:property value="attr.username"/><br>
<s:property value="#application.online"/><br>
<s:property value="#attr.online"/><br>
<br>
<s:debug/>
</body>
</html>